package com.anpy.anlibrary

import com.anpy.anlibrary.base.BaseViewModel
import com.anpy.anlibrary.model.BaseEntity
import com.anpy.anlibrary.net.NetWrapper
import com.anpy.anlibrary.net.httpBase
import com.anpy.anlibrary.utils.AnLog
import java.util.logging.Logger

open class ApiModel : BaseViewModel() {

    fun loginRequest(userName: String, pwd: String, callBack: (loginEntity: BaseEntity) -> Unit) {
        jobs += httpBase<BaseEntity> {
            url = "http://192.168.2.46:10000/product/category/list/tree"
            params = mutableMapOf("userName" to userName, "pwd" to pwd)
            response(callBack)
        }
    }

}